package letsjava.hibernate;

import java.util.Date;

import org.hibernate.Session;

public class Test {

	private Long id;
	private String name;
	
	public static void main(String[] args){
		Session session = HibernateUtil.getSessionFactory().getCurrentSession();

		session.beginTransaction();

		Test a = new Test();
		a.setName("hello");
		
		session.save(a);

		session.getTransaction().commit();
	}
	public Test() {

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}